<template>
	<view class="mainpadding">
		<view class="flexbetween flex_wrap">
			<view class="ffffff radius block" @click="jumper('/pages/dingdan/wodemaidan')">
				<view class="xiaolan ershiba fonweight textright">{{dataAll.md_num}}</view>
				<view class="icon">
					<image src="../../static/image/sysem/wdmd.png" mode=""></image>
				</view>
				<view class="margin_top1 titletext xiaohei nofonweight textcenter">我的买单</view>
			</view>
			<view class="ffffff radius block"  @click="jumper('/pages/dingdan/wodezhuanpai')">
				<view class="xiaolan ershiba fonweight textright">{{dataAll.zp_num}}</view>
				<view class="icon">
					<image src="../../static/image/sysem/wdzp.png" mode=""></image>
				</view>
				<view class="margin_top1 titletext xiaohei nofonweight textcenter">我的转拍</view>
			</view>
			<view class="ffffff radius block margin_top" @click="jumper('/pages/dingdan/wodemaid')">
				<view class="xiaolan ershiba fonweight textright">{{dataAll.mdd_num}}</view>
				<view class="icon">
					<image src="../../static/image/sysem/wdmd1.png" mode=""></image>
				</view>
				<view class="margin_top1 titletext xiaohei nofonweight textcenter">我的卖单</view>
			</view>
			<view class="ffffff radius block margin_top"  @click="jumper('/pages/dingdan/duihuanqd')">
				<view class="xiaolan ershiba fonweight textright">{{dataAll.soreorder_num}}</view>
				<view class="icon">
					<image src="../../static/image/sysem/dhqd.png" mode=""></image>
				</view>
				<view class="margin_top1 titletext xiaohei nofonweight textcenter">购货清单</view>
			</view>
		</view>

	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				dataAll:{},
				is_login:false
			}
		},
		onShow() {
			this.is_login = httpRequest.checkIsLogin();
			if (this.is_login) {
				this.init()
			}else{
				this.dataAll = {}
			}
		},
		methods: {
			init(){
				httpRequest.request("/api/cccl/orderData", 'GET', {}, false, false, true).then(res => {
					this.dataAll = res.data
				})
			},
			jumper(url) {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.block {
		width: 40%;
		padding: 30rpx 30rpx;
	}

	.icon {
		margin: auto;
		width: 100rpx;
		height: 100rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	page {
		background-color: #fafafa;
	}
</style>